<template>
	<view class="container">
		<view class="inner">
			<view class="bankCard" v-for="item in bankCardList" :key="item.id">
				<view class="title">
					{{item.bankName}}
				</view>
<!-- 				<view class="subtitle">
					储蓄卡
				</view> -->
				<view class="cardNo">
					···· ···· ···· {{ item.cardNo.slice(-4) }}
				</view>
			</view>
<!-- 			<view class="btn" @click="toBindCard">
				<uni-icons type="plusempty" size="26" style="margin-right: 10rpx;"></uni-icons> 添加银行卡
			</view> -->
		</view>
	</view>
</template>

<script>
	import {reqBankCardList} from "@/apis/my.js";
	export default {
		data() {
			return {
				memberId:'',
				bankCardList:[],
			}
		},
		mounted() {
			this.memberId = this.$store.getters.userInfo.id
			this.getBankList();
		},
		methods: {
			async getBankList(){
				let res = await reqBankCardList({memberId:this.memberId});
				
				if(res.code === 200){
					this.bankCardList = res.data;
				}
			},
			toBindCard(){
				uni.navigateTo({
					url:'/packageB/pages/takePhoto/takePhoto?type=2'
				})
			}
		},
	}
</script>
<style>
	page {
		background: #f7f7f7;
	}
</style>
<style scoped lang="scss">
	.container{
		padding: 20rpx;
		.inner{
			.bankCard{
				padding: 40rpx;
				background-color: #2f64ff;
				// background-image: url(/static/my/bankbg.png);
				background-size: cover;
				border-radius: 10rpx;
				margin-bottom: 20rpx;
				.title{
					font-size: 32rpx;
					color: #fff;
					// margin-bottom: 5rpx;
					margin-bottom: 65rpx;
				}
				// .subtitle{
				// 	font-size: 24rpx;
				// 	color: rgba(255, 255, 255, .6);
				// 	margin-bottom: 30rpx;
				// }
				.cardNo{
					font-size: 48rpx;
					color: #fff;
				}
			}
			.btn{
				padding: 40rpx;
				font-size: 36rpx;
				background-color: #fff;
				border-radius: 15rpx;
				color: #1a1a1a;
				display: flex;
				align-items: center;
			}
		}
	}
</style>